/* eslint-disable no-unused-vars */
// @ts-nocheck

import Vue from 'vue';
import 'ant-design-vue/dist/antd.css';
import Element from 'element-ui';
import './styles/element-variables.scss';
import '@/styles/index.scss'; // global css

import App from './App';
import store from './store';
import router from './router';
import Antd from 'ant-design-vue';
// import './utils/resizePage'
import './icons'; // icon
import './permission'; // permission control
import 'xe-utils';
import VXETable from 'vxe-table';
import 'vxe-table/lib/index.css';
import VXETablePluginElement from 'vxe-table-plugin-element';
import 'vxe-table-plugin-element/dist/style.css';
import dialogDrag from './utils/dialogDrag.js';
// import echarts from 'echarts';

// 引入echart 需要这样去写
import * as echarts from 'echarts';

import 'echarts-gl';
// 地图组件
import VueAMap from 'vue-amap';
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view';
// 自定义图图标引入（不是矢量图）
import './assets/icon/iconfont.css';
// 系统加载
import loading from './components/SysLoading/loading';
import { getTokenRoleList } from '@/utils/auth.js';
import animated from 'animate.css';
getTokenRoleList();
import Print from 'vue-print-nb';

const xinchang = require('@/assets/map/xinchang.json');
const keqiaozi = require('@/assets/map/柯桥子.json');
const keqiao = require('@/assets/map/柯桥.json');
const qixian = require('@/assets/map/齐贤街道.json');
const zhejian = require('@/assets/map/zhejian.json');
const shaoxin = require('@/assets/map/shaoxin.json');
for (let i = 1; i < 10; i++) {
  echarts.registerMap('zhejian' + i, zhejian);
  echarts.registerMap('keqiao' + i, keqiao);
  echarts.registerMap('shaoxin' + i, shaoxin);
}
echarts.registerMap('zhejian', zhejian);
echarts.registerMap('shaoxin', shaoxin);
echarts.registerMap('shaoxinzi', shaoxin);
echarts.registerMap('zhejianzi', zhejian);
echarts.registerMap('keqiao', keqiao);
echarts.registerMap('xinchang', xinchang);
echarts.registerMap('keqiaozi', keqiaozi);
echarts.registerMap('qixian', qixian);
Vue.use(animated);
Vue.use(Antd);
Vue.use(Element, {});
Vue.use(VXETable);
Vue.use(loading);
Vue.use(Print); // 注册
// 地图
Vue.use(VueAMap);
// 高德地图
VueAMap.initAMapApiLoader({
  key: 'b11860742af1d309e3082d65ec9381df',
  plugin: [
    'AMap.Geolocation', // 定位空间，用来获取和展示用户主机所在的经纬度位置
    'AMap.Autocomplete ', // 输入提示插件
    'AMap.PlaceSearch ', // POI搜索插件
    'AMap.Scale ', // 右下角缩略图插件，比例尺
    'AMap.OverView ', // 地图鹰眼插件
    'AMap.ToolBar ', // 地图工具条
    'AMap.MapType ', // 类别切换空间，实现默认图层与卫星图，实施交通层之间切换的控制
    'AMap.PolyEditor ', // 编辑 折线多边形
    'AMap.CircleEditor ',
    'AMap.Geocoder' // 地图编码

  ],
  v: '1.4.4'
});
VXETable.use(VXETablePluginElement);

Vue.use(dataV);
Vue.prototype.$echarts = echarts;
Vue.config.productionTip = false;
localStorage.setItem('id', '1');
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});

